<?php

namespace backend\models\system;

use Yii;
use backend\models\system\SysConfig;

/**
 * ContactForm is the model behind the contact form.
 */
class ShareFrom extends SysConfig
{
	public $consulting_share;
	public $class_share;
	/**
	 * @inheritdoc 验证规则
	 */
	public function rules()
	{
		return [
			[['consulting_share','class_share'], 'required'],
			//[['config_type'],'integer'],
		];
	}

	public function attributeLabels()
	{
		return [
			'consulting_share' => '咨询分享内容',
			'class_share' => '课程分享内容',
		];
	}

	/**
	 * @inheritdoc 修改配置项信息
	 */
	public function getValue()
	{
		return $this->find()
				->where(["config_type"=>$this->config_type])
				->asArray()
				->all();
	}
}